<template>
    <div>
        <nav-bar title="我的收藏"></nav-bar>
        <store-list :storeList="storeList"></store-list>
    </div>
</template>

<script>
import collection from '@/api/collection'

import NavBar from '@/components/navbar/NavBar.vue'
import StoreList from '@/components/store/StoreList.vue'

export default {
    components:{
        StoreList,
        NavBar
    },
    data(){
        return{
            storeList: [],
        }
    },
    created(){
       this.getCollection()
    },
    methods:{
        getCollection(){
            let params = {
                'token': 'hhhhh'
            }

            collection.getCollectionByUser(params)
            .then(res => {
                if(res.code ==200){
                    this.storeList = res.storeList
                }
            })
        }
    }
}
</script>